Method:

ACF: The autocorrelation function (ACF) defines how data points in a time series are related, on average, to the preceding data points (Box, Jenkins, & Reinsel, 1994). In other words, it measures the self-similarity of the signal over different delay times. Accordingly, the ACF is a function of the delay or lag Ï„, which determines the time shift taken into the past to estimate the similarity between data points. https://en.wikipedia.org/wiki/Autocorrelation

PACF: The partial autocorrelation at lag k is the correlation that results after removing the effect of any correlations due to the terms at shorter lags. https://en.wikipedia.org/wiki/Partial_autocorrelation_function

CCF:

In signal processing, cross-correlation is a measure of similarity of two series as a function of the displacement of one relative to the other.

Alt Text

Alt Text https://en.wikipedia.org/wiki/Cross-correlation

Granger causality

The Granger causality test is a statistical hypothesis test for determining whether one time series is useful in forecasting another, first proposed in 1969. Let y and x be stationary time series. To test the null hypothesis that x does not Granger-cause y, one first finds the proper lagged values of y to include in an univariate autoregression of y:

\[{\displaystyle y_{t}=a_{0}+a_{1}y_{t-1}+a_{2}y_{t-2}+\cdots +a_{m}y_{t-m}+{\text{error}}_{t}.}\] Next, the autoregression is augmented by including lagged values of x:

\[{\displaystyle y_{t}=a_{0}+a_{1}y_{t-1}+a_{2}y_{t-2}+\cdots +a_{m}y_{t-m}+b_{p}x_{t-p}+\cdots +b_{q}x_{t-q}+{\text{error}}_{t}.}\]

One retains in this regression all lagged values of x that are individually significant according to their t-statistics, provided that collectively they add explanatory power to the regression according to an F-test (whose null hypothesis is no explanatory power jointly added by the x’s). In the notation of the above augmented regression, p is the shortest, and q is the longest, lag length for which the lagged value of x is significant.

The null hypothesis that x does not Granger-cause y is accepted if and only if no lagged values of x are retained in the regression.

https://en.wikipedia.org/wiki/Granger_causality

Analyse 6 complete sensors

125627

CCF

Granger causality test

## Granger causality test
## 
## Model 1: AQI_i ~ Lags(AQI_i, 1:33) + Lags(AQI_o, 1:33)
## Model 2: AQI_i ~ Lags(AQI_i, 1:33)
##   Res.Df  Df      F    Pr(>F)    
## 1   3927                         
## 2   3960 -33 2.0808 0.0002903 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

127177

CCF

Granger causality test

## Granger causality test
## 
## Model 1: AQI_i ~ Lags(AQI_i, 1:2) + Lags(AQI_o, 1:2)
## Model 2: AQI_i ~ Lags(AQI_i, 1:2)
##   Res.Df Df      F  Pr(>F)  
## 1   4020                    
## 2   4022 -2 3.2707 0.03808 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

127187

CCF

Granger causality test

## Granger causality test
## 
## Model 1: AQI_i ~ Lags(AQI_i, 1:1) + Lags(AQI_o, 1:1)
## Model 2: AQI_i ~ Lags(AQI_i, 1:1)
##   Res.Df Df      F Pr(>F)
## 1   4023                 
## 2   4024 -1 0.3232 0.5697

127221

CCF

Granger causality test

## Granger causality test
## 
## Model 1: AQI_i ~ Lags(AQI_i, 1:2) + Lags(AQI_o, 1:2)
## Model 2: AQI_i ~ Lags(AQI_i, 1:2)
##   Res.Df Df      F    Pr(>F)    
## 1   4020                        
## 2   4022 -2 7.5486 0.0005344 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

127227

CCF

Granger causality test

## Granger causality test
## 
## Model 1: AQI_i ~ Lags(AQI_i, 1:1) + Lags(AQI_o, 1:1)
## Model 2: AQI_i ~ Lags(AQI_i, 1:1)
##   Res.Df Df      F   Pr(>F)   
## 1   4022                      
## 2   4023 -1 9.8204 0.001738 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

127303

CCF

Granger causality test

## Granger causality test
## 
## Model 1: AQI_i ~ Lags(AQI_i, 1:2) + Lags(AQI_o, 1:2)
## Model 2: AQI_i ~ Lags(AQI_i, 1:2)
##   Res.Df Df     F  Pr(>F)  
## 1   4016                   
## 2   4018 -2 3.061 0.04695 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1